home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmigaPlus / AmigaOS / Aplus_Dev / AP-Website / links / admin / main.php < prev    next >
Encoding:
PHP Script  |  2002-10-28  |  3.4 KB  |  130 lines

  1. <?
  2. // *******************************************************************
  3. //  admin/main.php
  4. // *******************************************************************
  5.  
  6. include("../include/config.php");
  7. include("../include/functions.php");
  8.  
  9. include("../include/common.php");
  10. $language = $gl["Language"];
  11.  
  12. include("../include/lang/$language.php");
  13.  
  14. include("../include/session.php");
  15. session_start();
  16.  
  17. $temp = sql_query("
  18.     select
  19.         *
  20.     from
  21.         $tb_temp
  22. ");
  23.  
  24. $reviews = sql_query("
  25.     select
  26.         *
  27.     from
  28.         $tb_reviews
  29.     where
  30.         Status='New'
  31. ");
  32.  
  33. $sites = sql_query("
  34.     select
  35.         count(*) as count
  36.     from
  37.         $tb_links
  38. ");
  39. $sites_array = sql_fetch_array($sites);
  40.  
  41. $categories = sql_query("
  42.     select
  43.         count(*) as count
  44.     from
  45.         $tb_categories
  46. ");
  47. $categories_array = sql_fetch_array($categories);
  48.  
  49. ?>
  50.  
  51. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  52. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  53. <html>
  54. <head>
  55.     <title></title>
  56.     <link rel = "stylesheet" type = "text/css" href = "style.css" />
  57. </head>
  58. <?=$adm_body?>
  59. <table border="0" cellpadding="0" cellspacing="0">
  60. <tr>
  61.     <td class="title">Main Page</td>
  62. </tr>
  63. <tr>
  64.     <td class="text">
  65.     You have <?=sql_num_rows($temp)?> new sites to <a href="sites.php?<?=session_name()?>=<?=session_id()?>">validate</a>.
  66.     <br />
  67.     You have <?=sql_num_rows($reviews)?> new site reviews to <a href="reviews.php?<?=session_name()?>=<?=session_id()?>">validate</a>.
  68.     <br />
  69.     You have <?=$sites_array["count"]?> total sites. <a href="sites.php?<?=session_name()?>=<?=session_id()?>">Edit Sites</a>.
  70.     <br />
  71.     You have <?=$categories_array["count"]?> total categories. <a href="categories.php?<?=session_name()?>=<?=session_id()?>">Edit Categories</a>.
  72.     <br />
  73.     <?
  74.         $rel_query = sql_query("
  75.         select
  76.             $tb_categories.ID as cat_id
  77.         from
  78.             $tb_categories
  79.         left join
  80.             $tb_related
  81.         on
  82.             $tb_categories.ID=$tb_related.cat_id
  83.         where
  84.             $tb_related.cat_id is null
  85.         and
  86.             $tb_categories.PID != '0'
  87.         order by
  88.             $tb_categories.ID
  89.     ");
  90.     $rel_count = sql_num_rows($rel_query);
  91.  
  92.     ?>
  93.     <? if($rel_count>0){?>You have <?=($rel_count+0)?> <a href="unrelated.php?<?=session_name()?>=<?=session_id()?>">unrelated categorie<? if($rel_count != 1){ echo "s";}?></a>.
  94.     <br /><?}?>
  95.     <?
  96.     $sql = sql_query("
  97.         select
  98.             count(*) as count
  99.         from
  100.             $tb_sessions
  101.         where
  102.             expire > UNIX_TIMESTAMP() - 300
  103.         ");
  104.     $rows = sql_fetch_array($sql);
  105.     ?>
  106.     There <? if($rows["count"] != 1 ){ echo "are";} else { echo "is"; }?> <?=($rows["count"]+0)?> visitor<? if($rows["count"]!=1){ echo "s";}?> online including yourself.
  107.     </td>
  108. </tr>
  109. </table>
  110. <br />
  111. <table border="0" cellpadding="0" cellspacing="0">
  112. <tr>
  113.     <td class="title">
  114.     Help fund phpLinks development:
  115.     <!-- Begin PayPal Logo -->
  116.     <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
  117.     <input type="hidden" name="cmd" value="_xclick">
  118.     <input type="hidden" name="business" value="webmaster@destiney.com">
  119.     <input type="hidden" name="item_name" value="phpLinks">
  120.     <input type="hidden" name="item_number" value="1">
  121.     <input type="hidden" name="no_shipping" value="1">
  122.     <input type="image" src="../images/x-click-but21.gif" border="0" name="submit" alt="Make a donation to the phpLinks cause with PayPal - it's fast, free and secure!" title="Make a donation to the phpLinks cause with PayPal - it's fast, free and secure!">
  123.     </form>
  124.     <!-- End PayPal Logo --></td>
  125. </tr>
  126. </table>
  127.         
  128. </body>
  129. </html>
  130.